Haibo Zhou's site

Mobile Development Articles

CocoaPods compatibility issue with Apple M1 (Silicon)

text

   

Apple has shipped the new Mac M1, which is shocking the world again, like iPhone’s event. I have seen many videos talking the performance comparing between Mac with intel chip and Mac M1.

Well, I received this machine recently. It is a really powerful computer, especially when you are developing iOS app. As an iOS developer, we usually get pained when dealing with iOS simulator, with some games, image filter, videos, we could see they are really slow on Mac with intel chip. But now, Apple silicon used ARM architecture. That is the same architecture with iPhone, iPad, iWatch. What is it mean? It means we could run native simulator in Mac computer! Or maybe remove simulator as just native app. We could run even iPhone, iPad app in Mac M1 computers now.

Meantime, it has many cons as it is the first son of this new revolution. One of them is the compatibility problems. A lot of software or framework things working on intel chip may not work on Apple silicon until those companies or publisher create the new versions for Apple Silicon.

E.g. I meet 1 issue when using pod install. The reason is that cocoaPods lose the compatibility with Apple silicon for now. See below issue in Github.

CocoaPods compatibility with Apple DTK (Apple Silicon)

   

The workaround:

  • Run terminal in Rosetta”.
  • Run sudo gem install ffi before pod install.
text

   

Hope this article could help guys who purchases the new Mac M1 and meet the similar issues.

Tagged with: